import java.util.Scanner;

public class Main {


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入名字：");
        String name = scanner.nextLine();

        System.out.println("输入密码：");
         int password = scanner.nextInt();

        Login login = new Login();
        try {
            login.loginInfo(name,password);
        } catch (PasswordException e1) {
            e1.printStackTrace();
            System.out.println("捕获到PasswordException异常");
        } catch (UserNameException e2) {
            e2.printStackTrace();
            System.out.println("捕获到UserNameException异常");
        }
    }
}